<div class="featuredRow">
  Nombre:<br/> <%= text_field :desc, :name %><br/>
    </div>
      <div class="featuredRow">
        Tipo:<br/> <%= select(:desc_data, :kind, [[ "Texto plano", 2 ], ["Archivo", 1]] ) %><br/>
      </div>
      <div class="featuredRow">
        <% if @assignment %>
          Ponderacion del final: <br/><%= text_field :desc, :weight %><br/>
        <% end %>
      </div>
      <script language="javascript">
        function cambiar(){
          if( $("desc_data_kind").selectedIndex == 0 ){
            Effect.Fade('fileField');
            $("tfF").disabled = true;
            Effect.Appear('textArea');
            $("taF").disabled = false;
          }
          else if( $("desc_data_kind").selectedIndex == 1 ){
            Effect.Fade('textArea');
            $("taF").disabled = true;
            Effect.Appear('fileField');
            $("tfF").disabled = false;
          }
        }
        $('desc_data_kind').onchange = cambiar;
      </script>
      <div class="featuredRow" id="textArea">Descripcion: <br/><%= text_area :desc_data, :data, :id => 'taF' %><br/></div>
      <div class="featuredRow" id="fileField" style="display: none">Archivo: <br/><%= file_field :desc_data, :data, :id => 'tfF' %></div>
      <script language="javascript">
        cambiar();
      </script>

      <div class="featuredRow">Fecha de inicio: <br/><%= datetime_select(:desc, :due_date, :discard_second => true) %></div><br/>

      <div class="featuredRow">Fecha de expiracion: <br/><%= datetime_select(:desc, :expire_date, :discard_second => true) %> <br/></div>
      <div class="featuredRow"><%= submit_tag "Agregar" %></div>
